import main
import datetime
import output

train_dates = [datetime.datetime(2014, 9, 10, 0, 0)]
for start_date in train_dates:
    end_date = start_date + datetime.timedelta(days = 1)
    [class_data, scan_data_binned, gps_data] = main.load_data(start_date, end_date)

    #Undirected graph of routers    
    output.plot_router_network(scan_data_binned, "routers_undirected_graph.pdf", 2, -1)

#scan_small = OrderedDict()
#for router in scan_data_routers_count_1min_bin:
#    for s_date in scan_data_routers_count_1min_bin[router]:
#        if s_date[0] >= datetime.datetime(2014,9,10,16,23) and s_date[0] <= datetime.datetime(2014,9,11,7,39):
#            if scan_small.has_key(router):
#                scan_small[router] = scan_small[router] + [s_date[0]]
#            else:
#                scan_small[router] = [s_date[0]]
#                
#count_dict = {}
#for router in scan_small:
#    count_dict[router] = len(scan_small[router])
#counted_dict_sort = sorted(count_dict.items(), reverse = True, key=lambda x: x[1])
#plt.bar(xrange(0, len(count_dict.keys())), count_dict.values())
#plt.show()